.class Lcom/nemustech/regina/ReginaLauncherSettings$2;
.super Ljava/lang/Object;
.source "ReginaLauncherSettings.java"

# interfaces
.implements Landroid/preference/Preference$OnPreferenceClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/nemustech/regina/ReginaLauncherSettings;->onCreate(Landroid/os/Bundle;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/nemustech/regina/ReginaLauncherSettings;


# direct methods
.method constructor <init>(Lcom/nemustech/regina/ReginaLauncherSettings;)V
    .locals 0
    .parameter

    .prologue
    .line 154
    iput-object p1, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onPreferenceClick(Landroid/preference/Preference;)Z
    .locals 10
    .parameter "preference"

    .prologue
    const/4 v9, 0x0

    const v8, 0x7f070093

    const/4 v7, 0x1

    const/4 v6, 0x0

    .line 158
    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$500(Lcom/nemustech/regina/ReginaLauncherSettings;)Landroid/content/SharedPreferences;

    move-result-object v3

    const-string v4, "regina.launcher.secret.passnum"

    invoke-interface {v3, v4, v9}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 159
    .local v2, secretKey:Ljava/lang/String;
    if-nez v2, :cond_2

    .line 160
    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$700(Lcom/nemustech/regina/ReginaLauncherSettings;)Landroid/preference/CheckBoxPreference;

    move-result-object v3

    iget-object v4, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v4}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$600(Lcom/nemustech/regina/ReginaLauncherSettings;)Z

    move-result v4

    if-nez v4, :cond_1

    move v4, v7

    :goto_0
    invoke-virtual {v3, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    .line 161
    new-instance v3, Landroid/app/AlertDialog$Builder;

    iget-object v4, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-direct {v3, v4}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v4, 0x7f020077

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    iget-object v4, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    const v5, 0x7f07005c

    invoke-virtual {v4, v5}, Lcom/nemustech/regina/ReginaLauncherSettings;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    const-string v4, "Set secret password first."

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    const-string v4, "OK"

    invoke-virtual {v3, v4, v9}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v1

    .line 166
    .local v1, builder:Landroid/app/AlertDialog$Builder;
    invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    .line 167
    .local v0, alert:Landroid/app/AlertDialog;
    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    .line 168
    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$800(Lcom/nemustech/regina/ReginaLauncherSettings;)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    iget-object v4, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-virtual {v4, v8}, Lcom/nemustech/regina/ReginaLauncherSettings;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-interface {v3, v4, v7}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    .line 169
    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$800(Lcom/nemustech/regina/ReginaLauncherSettings;)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    invoke-interface {v3}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 177
    .end local v0           #alert:Landroid/app/AlertDialog;
    .end local v1           #builder:Landroid/app/AlertDialog$Builder;
    :cond_0
    :goto_1
    return v6

    :cond_1
    move v4, v6

    .line 160
    goto :goto_0

    .line 171
    :cond_2
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v3

    if-lez v3, :cond_0

    .line 172
    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    iget-object v4, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v4}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$600(Lcom/nemustech/regina/ReginaLauncherSettings;)Z

    move-result v4

    if-nez v4, :cond_3

    move v4, v7

    :goto_2
    invoke-static {v3, v4}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$602(Lcom/nemustech/regina/ReginaLauncherSettings;Z)Z

    .line 173
    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$800(Lcom/nemustech/regina/ReginaLauncherSettings;)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    iget-object v4, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-virtual {v4, v8}, Lcom/nemustech/regina/ReginaLauncherSettings;->getString(I)Ljava/lang/String;

    move-result-object v4

    iget-object v5, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v5}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$600(Lcom/nemustech/regina/ReginaLauncherSettings;)Z

    move-result v5

    invoke-interface {v3, v4, v5}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    .line 174
    iget-object v3, p0, Lcom/nemustech/regina/ReginaLauncherSettings$2;->this$0:Lcom/nemustech/regina/ReginaLauncherSettings;

    invoke-static {v3}, Lcom/nemustech/regina/ReginaLauncherSettings;->access$800(Lcom/nemustech/regina/ReginaLauncherSettings;)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    invoke-interface {v3}, Landroid/content/SharedPreferences$Editor;->commit()Z

    goto :goto_1

    :cond_3
    move v4, v6

    .line 172
    goto :goto_2
.end method
